HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/wp-recipe-maker/assets/js/other/yoast-compatibility.js
WPRecipeMakerYoast = function() {
    YoastSEO.app.registerPlugin( 'wprecipemaker', {status: 'ready'} );
    YoastSEO.app.registerModification( 'content', this.wprmContentModification, 'wprecipemaker', 5 );
}

WPRecipeMakerYoast.prototype.wprmContentModification = function( data ) {
    // Remove block editor blocks.
    data = data.replace(/<!-- wp:wp-recipe-maker\/recipe [\s\S]*?\/wp:wp-recipe-maker\/[^\s]* -->/gm, '');
    data = data.replace(/<!-- wp:wp-recipe-maker\/recipe-snippet [\s\S]*? \/-->/gm, '');

    // Remove classic editor shortcode.
    data = data.replace(/(<p>)?\s*\[[^\[]*wprm-recipe[^\]]*\]\s*(<\/p>)?/ig, '');

    return data;
};

jQuery(window).on('YoastSEO:ready', function () {
    new WPRecipeMakerYoast();
});